package org.lanplay.server.model;

import java.io.Serializable;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

import lombok.Data;

import org.lanplay.server.entitymodel.Identifiable;

@MappedSuperclass
@Data
public class BaseVersionedIdentifiable implements Identifiable<Long>, Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE)
//	@Setter(AccessLevel.PROTECTED)
	private Long id;
	
	@Version
	private int version;
}
